<?php
require(dirname(__FILE__) . '/includes/init.php');
if ($_REQUEST['act'] == 'book'){
	$descr =  $_REQUEST['descr'];
	$enrol_name = $_REQUEST['enrol_name'];
	$pt_cat = $_REQUEST['pt_cat'];
	$sql = "INSERT INTO " .$ecs->table('short_note'). "(pt_cat,descr,enrol_time,enrol_name)".
                "VALUES ('".$pt_cat."','".$descr."','".time()."','".$enrol_name."')";
    $db->query($sql);
	header("Location: shortNote_list.php\n");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 便单登记 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<h1>
<span class="action-span"><a href="shortNote_list.php">便单列表</a></span>
<span class="action-span1"><a href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> - 便单登记 </span>
<div style="clear:both"></div>
</h1> 
<div class="tab-div">
 <form enctype="multipart/form-data" action="" method="post" name="theForm" onsubmit="return shortnote_yz()">
        <table width="50%" id="general-table" align="center">
          <tr>
            <td class="label">平台：</td>
            <td><select name="pt_cat" id="pt_cat">
			<option value="0">请选择...</option>
			<option value="1">京东商城</option>
			<option value="2">一号店</option>
			<option value="3">QQ商城</option>
			<option value="4">天猫商城</option>
			</select>
            </td>
          </tr>
          <tr>
            <td class="label">内容：</td>
            <td><textarea name="descr" cols="40" rows="3"></textarea></td>
          </tr>
		  <tr>
            <td class="label">登记人：</td>
            <td><input type="text" name="enrol_name" value="" size="40" id="enrol_name"/><input type="hidden" name="act" value="book" /></td>
          </tr>
        </table>
 
        <div class="button-div">
          <input type="submit" value=" 确定 " class="button" />
          <input type="reset" value=" 重置 " class="button" />
        </div>
      </form>
</div>
</body>
</html>